package com.pojo.vo;

import lombok.Data;

@Data //生成get,set方法，equals方法，hadcode方法和toString方法

public class OtpVo {
    String code;//一次性密码
    String key;//位于redis中的键
    Long generateTime;//密码生成时间
    Long expireTime;//密码失效时间
    public static final Integer DETAUL_OPT_EXIPRE = 10;

    public OtpVo(String key, String code, Long generateTime, Integer expire) {
        this.code = code;
        this.key = key;
        this.generateTime = generateTime;
        this.expireTime = generateTime + expire * 60 * 1000;
    }
}
